package logic;

import java.io.Serializable;
import java.util.Date;


/**
 * book class
 *
 */
public class Title implements Serializable{
	/**
	 * book catalog number
	 */
    int catalognumber;
    /**book name
     */
	private String name;
	/**
	 * book author
	 */
	private String author;
	/**
	 * book edition number
	 */
	private String editionNum;
	/**
	 * book print date
	 */
	private Date printDate;
	/**
	 * book subject
	 */
	private String subject;
	/**
	 * book description
	 */
	private String description;
	/**
	 * total book copies in library
	 */
	private int copies;
	/**
	 * book purchased date
	 */
	private Date purchaseDate;
	/**
	 * book location on shelf
	 */
	private String ShelfLocation;
	/**
	 * object that will contain the PDF of the book
	 */
	public PdfFile tableOfContents;
	/**
	 * book storage currently in library
	 */
	private int inStorage;
	/**
	 * book wanted or regular (true=wanted,false=regular)
	 */
	private boolean wanted;
	/**
	 * constructor that gets only catalog number 
	 * @param catalognumber the catalog number
	 */
	public Title(int catalognumber)
	{
		this.catalognumber=catalognumber;
		 name=null;
		 author=null;
		 editionNum=null;
		 printDate=null;
		 subject=null;
		 description=null;
		 copies=0;
		 purchaseDate=null;
		 ShelfLocation=null;
		 tableOfContents=null;
		 inStorage=0;
		 wanted=false;
		
	}
	/**
	 * default constructor
	 */
	public Title()
	{
		catalognumber=0;
		name=null;
		author=null;
		editionNum=null;
		printDate=null;
		subject=null;
		description=null;
		copies=0;
		purchaseDate=null;
		ShelfLocation=null;
		tableOfContents=null;
		inStorage=0;
		wanted=false;
		
	}
	/**
	 * constructor that gets all variables
	 * @param catalognumber
	 * @param name
	 * @param author
	 * @param editionNum
	 * @param printDate
	 * @param subject
	 * @param description
	 * @param copies
	 * @param purchaseDate
	 * @param ShelfLocation
	 * @param tableOfContents
	 */
	public Title( int catalognumber,String name,String author,String editionNum,Date printDate,String subject,String description,int copies,Date purchaseDate,
	String ShelfLocation,PdfFile tableOfContents)	
	{
		this.catalognumber=catalognumber;
		this.name=name;
		this.author=author;
		this.editionNum=editionNum;
		this.printDate=printDate;
		this.subject=subject;
		this.description=description;
		this.copies=copies;
		this.purchaseDate=purchaseDate;
		this.ShelfLocation=ShelfLocation;
		this.tableOfContents=tableOfContents;
		this.inStorage=copies;
		
	}
	/**
	 * constructor without pdf file
	 * @param catalognumber
	 * @param name
	 * @param author
	 * @param editionNum
	 * @param printDate
	 * @param subject
	 * @param description
	 * @param copies
	 * @param purchaseDate
	 * @param ShelfLocation
	 */
	public Title( int catalognumber,String name,String author,String editionNum,Date printDate,String subject,String description,int copies,Date purchaseDate,
			String ShelfLocation)	
			{
				this.catalognumber=catalognumber;
				this.name=name;
				this.author=author;
				this.editionNum=editionNum;
				this.printDate=printDate;
				this.subject=subject;
				this.description=description;
				this.copies=copies;
				this.purchaseDate=purchaseDate;
				this.ShelfLocation=ShelfLocation;
				this.tableOfContents=null;
				this.inStorage=copies;
				
			}


	public void setCatalogNumber(int catalognumber) {
		this.catalognumber = catalognumber;
	}
	public int  getCatalogNumber() {
		return  catalognumber;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getAuthor() {
		return author;
	}
	public void setAuthor(String author) {
		this.author = author;
	}
	public String getEditionNum() {
		return editionNum;
	}
	public void setEditionNum(String editionNum) {
		this.editionNum = editionNum;
	}
	public Date getPrintDate() {
		return printDate;
	}
	public void setPrintDate(Date printDate) {
		this.printDate = printDate;
	}
	public String getSubject() {
		return subject;
	}
	public void setSubject(String subject) {
		this.subject = subject;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public int getCopies() {
		return copies;
	}
	public void setCopies(int copies) {
		this.copies = copies;
	}
	public Date getPurchaseDate() {
		return purchaseDate;
	}
	public void setPurchaseDate(Date purchaseDate) {
		this.purchaseDate = purchaseDate;
	}
	public String getShelfLocation() {
		return ShelfLocation;
	}
	public void setShelfLocation(String shelfLocation) {
		ShelfLocation = shelfLocation;
	}
	public void setTableOfContents(PdfFile tableOfContents)
	
	{
		
		this.tableOfContents=tableOfContents;	
	
		
	}
	public PdfFile getTableOfContents()
	{
		
	return (this.tableOfContents);
	}
	
public void setInStorage(int inStorage)
	
	{
		
		this.inStorage=inStorage;	
	
		
	}
	public int getInStorage()
	{
		
	return (this.inStorage);
	}
public void setWanted(Boolean wanted)
	
	{
		
		this.wanted=wanted;	
	
		
	}
	public boolean getWanted()
	{
		
	return (this.wanted);
	}
	
	
}
